import React,{Component} from 'react'

const data = [
  {id:'01',countent:'欢迎光临'},
  {id:'02',countent:'欢迎再来'},
  {id:'03',countent:'别来了'},
]
export default class Detail extends Component{
  render(){

    const {id,title} = this.props.match.params
    const findResult = data.find((dataObj)=>{
      return dataObj.id === id
    })

    return (
      <ul>
        <li>ID:{id}</li>
        <li>TITLE:{title}</li>
        <li>CONTENT:{findResult.countent}</li>
      </ul>
    )
  }
}